<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[scenario]" value="add">
    {if condition="!$shopId"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('限定门店')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_ids" class="form-control selectpage" type="text"  name="row[shop_ids]" title="" data-multiple="true" data-source="yunfood/shop/main/index">
        </div>
    </div>
    {else /}
    <input type="hidden" name="row[shop_ids]" value="{$shopId|htmlentities}">
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" type="text" name="row[name]" title="" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('设备品牌')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[brand]', $brandList, null, ['class'=>'form-control selectpicker', 'id'=>'c-brand'])}
        </div>
    </div>
    <div id="box-feie">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('打印机编号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-feie-sn" class="form-control" type="text" name="row[feieData][sn]" title="" placeholder="sn">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('打印机识别码')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-feie-key" class="form-control" type="text" name="row[feieData][key]" title="" placeholder="key">
            </div>
        </div>
    </div>
    <div id="box-yilianyun" class="hide">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('终端号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-yilianyun-machine_code" class="form-control" type="text" name="row[yilianyunData][machine_code]" title="" placeholder="machine_code">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('终端密钥')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-yilianyun-msign" class="form-control" type="text" name="row[yilianyunData][msign]" title="" placeholder="msign，选填">
            </div>
        </div>
    </div>
    <div id="box-zhongwu" class="hide">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('设备号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-zhongwu-device_id" class="form-control" type="text" name="row[zhongwuData][device_id]" title="" placeholder="deviceid">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('设备秘钥')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-zhongwu-device_secret" class="form-control" type="text" name="row[zhongwuData][device_secret]" title="" placeholder="devicesecret">
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('打印场景')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[scenes][]', $sceneList, null, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-live-search'=>'true'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-note" class="form-control" type="text" name="row[note]" title="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', $statusList, null, ['class'=>'form-control selectpicker'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button class="btn btn-success btn-embossed disabled" type="submit">{:__('OK')}</button>
            <button class="btn btn-default btn-embossed" type="reset">{:__('Reset')}</button>
        </div>
    </div>
</form>